package com.shy.wonderfuleffect.activity

import android.content.Intent
import com.shy.wonderfuleffect.base.BaseActivity
import com.shy.wonderfuleffect.databinding.ActivityMainBinding
import com.shy.wonderfuleffect.service.WonderfulService

class MainActivity : BaseActivity<ActivityMainBinding>() {
    override fun initUi() {
        super.initUi()
        binding.btnStartService.setOnClickListener {
            startService(Intent(this, WonderfulService::class.java))
        }
        binding.btnStopService.setOnClickListener {
            stopService(Intent(this, WonderfulService::class.java))
        }
        binding.btnBigW.setOnClickListener {
            startService(Intent(this, WonderfulService::class.java).apply {
                putExtra("cmd", "big")
            })
        }
        binding.btnSmallW.setOnClickListener {
            startService(Intent(this, WonderfulService::class.java).apply {
                putExtra("cmd", "small")
            })
        }
        binding.btnHideW.setOnClickListener {
            startService(Intent(this, WonderfulService::class.java).apply {
                putExtra("cmd", "hide")
            })
        }
    }
}